<%--
  Created by IntelliJ IDEA.
  User: ghp
  Date: 2022/9/27
  Time: 8:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>JSP声明语句</title>
</head>
<%!
int a = 1,b = 2; //定义两个变量a,b
%>
<%!
    public String print() { //定义print方法
        String str = "itcast"; //方法内定义的变量str
        return str;
    }
%>
<body>


<%=a + b %><br/>
<%=print() %>
</body>
</html>
